﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Dynamic;

namespace BulldogCMS.Core.Storage
{
    public class NodeBag : DynamicObject
    {
        private Node _parentNode = null;

        public NodeBag(Node parentNode)
        {
            this._parentNode = parentNode;
        }

        public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
            result = this._parentNode.GetValue<DataTypes.BaseDataType>(binder.Name);
            return true;
        }

    }
}